perf(map): use Array.prototype.map if available

Closes #9067