How to get images idx=1,222,3333,55555 with a DataLoader?

From a training dataset for CIFAR100 (but this question is rather general) I want to load images with specific indexes, like for example 1, 222, 3333, 55555 (so, this would be a batch_size=4). How can I do it? Efficiency here would be cool, obviously, but currently I looking for any method.