Yep but I mean, you are running python. Thus, you use python lists.
The way of avoiding lists is trying not to make use of loops and writting it as pytorch operations.
If you need to speed up anything and to avoid python lists the way to go is making a c++ implementation.
https://pytorch.org/docs/master/cpp_index.html 4
But in general, it is “strange” to use lists in a forward. Because for almost all the official layers you can usually proccess everything at once with bit of rewriting.
The only case in which you must need to use for loops is for very customized operators or for dinamically generated networks (when you create N layers based on  a parameter and then you cannot manually call them all)
Another tool you is torchscript https://pytorch.org/docs/master/jit.html 2
But if you want the versatility and readability of lists, then you pay the price.