You can use advanced indexing (a la numpy) for that. It currently has some limitations, but can work fine in many situations:
a = torch.rand(2, 3, 4, 5)
b = a[:, :, [2, 3], [0, 3]]
a[:, [1, 2], [0, 3], :] = 1