If I understand the use case correctly, this should work:
x = torch.randn(8, 3, 6, 6)
idx = torch.cat((torch.randint(0, 3, (12, 1)), torch.randint(0, 6, (12, 2))), 1)

res = x[:, idx[:, 0], idx[:, 1], idx[:, 2]]