If you have an arbitrary number of values, it is best to split vertically.
Create a single variable, and output for every item. Keep the new variable, any variables you need for identification, and the counter.
A long dataset is always easier to use than a wide one.
... View more