EnumerateRange

Allows iterating over a range while also keeping track of the current iteration index.