Change Array serialization to use each_with_index, not Enumerable/each