Does DataLoader iterate through indexes to generate a batch?

Have a look at this code to see how to provide a list of indices to your Dataset.