Why don't you just iterate over the array of indexes and look for each index in the data array, replacing the index with a search object.
In the end, the array in which the indexes are stored now contains objects. If you do not want to destroy your index array, just create a new array of the same size as the index array and put the objects there.
, -. ( .)