Add index to ForEach* function params