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