Modernize for-loops in aten (#59598)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/59598
Test Plan: Sandcastle
Reviewed By: ngimel
Differential Revision: D28946826
fbshipit-source-id: 9f3f7e38833c2bc33d27243cef16ab0118c65f3a