Build subsets one at a time. For the subset being built, track how much sum you've accumulated. When it reaches target, start a new subset.
The mask tells you which elements are used. The partial sum (mod target) tells you how close the current subset is to complete. observation: can store the current partial sum. When , you've just completed a subset and are starting fresh.