Update enum_with_index to each_with_index.