Support functionalization for torch.map (#94558)
We restrict:
* Output of each map iteration aliasing the input
* In-place mutation on the list element or inputs given to the map function
Pull Request resolved: https://github.com/pytorch/pytorch/pull/94558
Approved by: https://github.com/tugsbayasgalan