<human>:  array to dict using attribute.
<bot>:)

# Calling the function
dictionary = array2dict(array)

# Printing the result
print(dictionary)

#Example Output
# {0: 1, 1: 2, 2: 3, 3: 4, 4: 5}

#Remember to inspect code for bugs.