Write a Polyfill for the Native Array.prototype.map() Method
Implement Array.prototype.map() from scratch. It should accept a callback (receiving element, index, and original array) and an optional thisArg, and return a new array of transformed values with the same length as the original. Handle sparse arrays by preserving holes, ensure non-mutation of the original, and support prototype chain attachment. Pair this with the filter and reduce polyfills for a complete functional toolkit.