generate all arrays permutations