Generate all permutations of the given array using Heap's algorithm (with its non-recursive variant).
The array to permute
getUniqueCombinationsOfSize
Generate all permutations of the given array using Heap's algorithm (with its non-recursive variant).