A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
I believe this is what you have in mind:
Personally I would favor unpivoting the data with Power query. But as mentioned in the article linked below, you can do it with a single dynamic array formula that spills the result in one instance. The article explains the technique in depth.
https://spreadsheetweb.com/how-to-unpivot-data-with-new-excel-functions/
The Excel formula in A10 is as follows:
=HSTACK(CHOOSEROWS(Table1[[col1][col3]],QUOTIENT(SEQUENCE(ROWS(Table1[col1])*3,,0),3)+1),TOCOL(Table1[[col4]:[col6]]))