In case where bulk read makes sense, you should not use DataLoader in the default random read style.
Here is a quick start on how to switch to bulk loading mode.
Instead, write a sampler that spits out keys representing batch index (e.g., range, or list of indices). For DataLoader, set batch_size=None and use sampler= for your new sampler. And in dataset code __getitem__, the input is what your custom sampler yields, so something that represents batch indices, so use that to index into your hdf5 and return the array.