Remove array section in extendedForEach function