As @albanD explained, you could transform the numpy arrays to tensors using:
data = torch.from_numpy(x)
target = torch.from_numpy(y)

and pass it to a TensorDataset:
dataset = TensorDataset(data, target)
loader = DataLoader(
    Dataset,
    batch_size=1,
    shuffle=False,
    num_workers=2
)