I understand, hopefully, the builtin Dataset+Dataloader constructs will allow you to do everything you need without having to worry about these questions and it will “just work”.
If you see unexpected results, you can ask questions here.