Subset — Pick or Not Pick

Assume as array [1, 2, 3]. We need to generate all possible subsets.