Try this example out to begin with ...
Parent list: call this ItemsList.
Subset variable: call this Group.
Group 1: Allocate items 1-7
Group 2: Allocate items 8-14
All respondents get access to 15-32
Pop this Perl Script into a constructed list (which uses ItemsList as the parent list). Call the constructed list ItemsConList.
Begin Unverified Perl
This constructed list assumes the respondent is either in Group 1 or Group 2 and adds the applicable items to the constructed list. It then adds all remaining list items 15-32, randomises the list and trims it to 13 items.
You did not mention anything about all Group items needing to be included in the final list of 13 items. If that is the case, we will need to tweak this solution.
For you quotas, define all 32 items and use the following logic for each ...
Item 1: ListHasParentMember(ItemsConList,1)
Item 2: ListHasParentMember(ItemsConList,2)
Item 31: ListHasParentMember(ItemsConList,31)
Item 32: ListHasParentMember(ItemsConList,32)