def get_interbreeding_indexes(index_count, including_same = False, cross = False, deep = 0) -> 'list':
    """Returns an array combining each with each element.

    Parameters
    ----------
    index_count : int
        The number of elements to interbreed.
    including_same : bool
        Combinations are possible.
    cross : bool
        The order of the returned indices is significant.

    Returns
    -------
    list
        Returns a list (array) of index combinations.

    """
    indexes = []
    correct = 1 if not including_same else 0
    for i in range(index_count - correct):
        index_from = deep
        index_to = i + deep + correct

        indexes.append([
            index_from,
            index_to
        ])

        if cross and index_from != index_to:
            indexes.append([
                index_to,
                index_from
            ])

    if index_count - correct > 1:
        indexes += get_interbreeding_indexes(index_count - 1, including_same, cross, deep + 1)

    return indexes