How to add a table to shopwares product detail page which lists all available variants for this product?

I'm trying to edit the .tpl of the article detail page in my shopware instance to be able to display a complete list of all available variants in a table view with a link in the last column to directly choose the listed variant.

https://shopware.demo2.sixhop.net/hoehenluft-abenteuer/fashion/herren/151/mi-pants-bacun?number=SW10151.5&c=5

So if there are two configuration possibilities like in this example: color and size, I would like to generate this table:

pants s green "link to variant"

pants m green "link to variant"

pants l green "link to variant"

pants xl green "link to variant"

pants xl green "link to variant"

pants s black "link to variant"

pants m black "link to variant"

pants l black "link to variant"

pants xl black "link to variant"

pants xl black "link to variant"

How can I get a list of available variants for a given base article? How is the link for this article being generated?

What I already did is to add a separate tab that can show the variant table then and some trial&error on generating the table. But simply connecting all variant possibilities will not give a good result, beacuse some variant possibilities may not be available. Therefore I would love to see an approach from the "get active variants"-perspective.