Returns an array containing the results of applying the given transform function to each element in the original array.