If there are many item X's and many item Y's, and you want to choose one of each, and pin them together, C2 can't guess that for you and neither can we. It's up to your logic to work that out. IF I've understood what you're asking.
If you DO know which item X and item Y you want to choose, then you CAN pick each one by UID, then pin them.
If they are BOTH the same object type (i.e. BOTH item X or BOTH item Y)then you can use a Family to pick.
Does any of these fit what you're asking?
edit: see if this helps. Here I'm using drag-drop to choose objects but you could use anything.
[attachment=1:ge500jmy][/attachment:ge500jmy]
edit: this one might be closer to what you're asking
[attachment=0:ge500jmy][/attachment:ge500jmy]