[BE] Do not use VLA (#85800)
[Variable Length Array](https://en.wikipedia.org/wiki/Variable-length_array) is part of C99 standard, but has never been adopted to C++
Also, warning if they are used (surprisingly those warnings can not be turned into errors.
Remove code duplication in `OperationUtils.mm`
Pull Request resolved: https://github.com/pytorch/pytorch/pull/85800
Approved by: https://github.com/kulinseth, https://github.com/jeanschmidt