Thanks to the brilliant @Jeff_Hager, we have now successfully implemented a dynamic product variant choice component. It was started from this discussion.
Based on this discussion and what Jeff and me worked on in the Sheets, I created an app that you can copy to work on for your own apps.
Basically you need to have:
A column that contains all sizes, separated by a comma (or you can change the separator in the formula if you have an existing one that is not a comma)
Determine the max number of different variants for a product and create the appropriate columns to store the size in an array column (e.g: Size 1, Size 2, Size 3, etc.)
Make another sheet to store the unique variants for all products. I have already solved that thanks to a combination of transpose, arrayformula, trim, split & textjoin.
Make a relation column in Glide that links the array column to the size array sheet and use that as your choice value.
The link to the app is here: https://hideous-seashore-9158.glideapp.io/