perf(extend): remove use of forEach to remove calls/closures/passing arguments

Closes #8898