Any ideas to generate all possible subarrays from an array?

julia> using Combinatorics

julia> collect(combinations([1,2,3]))
7-element Vector{Vector{Int64}}:
 [1]
 [2]
 [3]
 [1, 2]
 [1, 3]
 [2, 3]
 [1, 2, 3]
1 Like