Add an increment for an index in a loop