This function randomly samples nPerms of the choose(n, n1) possible treatment permutations. If nPerms > choose(n, n1), then all choose(n, n1) permutations are generated systematically. Also, in the case of 1-to-1 allocation, the complement treatment vectors are also produced, so the returned matrix has 2*nPerms permutations. Uniqueness is checked throughout and duplicate permutations disgarded.