How to programmatically create lookup field base on selected item from tokenlist?

How to programmatically create lookup field base on selected item from tokenlist? The number of lookup field is same as the number of selected items from tokenlist. The tokenlist is generated inside a table.
image

Hi,

Could you elaborate on this please? I just don’t get the algorithm. What is the case?

Already solve. Thanks