Generate all combinations of choosing k items from n items.
total number of items.
number of items to choose.
array of combinations, where each combination is an array of indices.
Generate all combinations of choosing k items from n items.