Replace the data structure of index from array to hash.