Welcome to the community!
If I understand correctly, you want a permutation of 1, 2, 3, 4 in each row. You can do something like this:
set.seed(seed = 34824)
t(x = replicate(n = 4,
expr = sample(x = 1:4)))
#> [,1] [,2] [,3] [,4]
#> [1,] 4 1 3 2
#> [2,] 2 4 3 1
#> [3,] 4 3 2 1
#> [4,] 4 2 1 3
Created on 2019-07-08 by the reprex package (v0.3.0)
However, there is no guarantee that two rows won't be identical, and there is also no guarantee that each column will also be a permutation. Do you have these constraints too?