Cleanest way to generate all combinations of n arrays

N = 3
lpad.(string.(0:N^N-1;base=N),N,'0').|>s->Int.(collect(s).-48)

Not the most efficient :slight_smile: