import random


def pick_random(arr, no_picks):
    """Randomly selects elements.

    If there are not enough elements, repetition is allowed.
    """
    # Expand untill there is enough repetition
    arr_to_pick_from = arr
    while len(arr_to_pick_from) < no_picks:
        arr_to_pick_from += arr
    # Pick
    random.shuffle(arr_to_pick_from)
    return arr_to_pick_from[:no_picks]