Save index to the indexes array.