Visit all k-combinations of an array in lexicographic order