Make the various array methods (forEach/map/filter) provide the array index to their respective callbacks

Tiny patch, fixes #741