list all the permutations of an array of char