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