def _get_list_value(index, array):
    """
    helper operation to loop a list of values regardless of the index value

    Example:
    >>> a = [111,222,333]
    >>> list_loop(15, a)
    111
    """
    if len(array) == 0:
        return None
    elif index >= 0 and index < len(array):
        return array[index]
    return array[index % len(array)]