Solution to getting all combinations of an integer array. Helps solve the Leetcode problem: combinations.