Output indexes from original input array. 1st try