Hello Paul,
You should be able to do what you want. What you could probably do is while you are creating your products, have a Dictionary for each printer (x, y, z in your example). On success of adding that product also add it's product id to your printers dictionary. Finally you can then iterate through each of your printer models, create the new collection then establish the relationship.
Collect is kinda weird, but it's the link between your product and the custom collection (in your case, the printers themselves).
--
Chris // Developer @ Shopify