Added a static map function for working with arrays.