Took a bit to figure it out but it was a really fun challenge, and I'm definitely gonna clean it up some and add it to my useful VI arsenal. This will work even if each attribute has a different number of values. Not sure if you will run into memory issues but it could maybe be optimized a bit more.
Config files would work nicely for attribute/value combinations because each section can be an attribute and each key can be a possible value, but you could get the "original array" easily enough from Excel, database, etc.
Hope this helps 😁