This should not be too slow. The array is iterated only once.
The result (ind) is a dictionary value -> list of indexes.
import numpy as np
arr = np.array([2, 3, 3, 4, 4, 9, 5, 6, 6, 6, 6, 7, 8, 9])
ind = dict()
for i, val in enumerate(arr):
ind.setdefault(val, []).append(i)