Simple function that takes a 2D slice and returns a 3D slice with all possible permutations in it