Generally the “threading” functions expect things to have the same shape. If I understand your situation, you have one set, XX that you want to pair with each of two other sets, contained in TT. Since the shapes aren’t the same (length 1 versus length 2), it will be awkward and convoluted to get threading to work. You could just map: