def idx_to_array_index(idx: int, idxpos0: int):
    """
    Converts a nucleotide index to an 0-included array index
    :param idx: The index to convert
    :param idxpos0: The start index
    :return: The index of the element in the array
    >>> idx_to_array_index(10, 5)
    5
    >>> idx_to_array_index(10, -200)
    209
    >>> idx_to_array_index(1, -1)
    1
    """
    return idx - idxpos0 - (1 if (idxpos0 < 0 < idx or idx < 0 < idxpos0) else 0)