perf(map): use Array.prototype.map

Replace helper functions with the native ES5 method