Update arrays.hpp

Fixed error in implementation of std::transform