trivially migrate std::transform output to mutable_data_ptr (#98756)
Differential Revision: [D44834598](https://our.internmc.facebook.com/intern/diff/D44834598/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/98756
Approved by: https://github.com/ezyang, https://github.com/Skylion007