google sheets – Expand Countifs Arrayformula in rows and columns

In this google sheet
I have an array of Types and floors, The criteria rows and headers are auto populated by unique formulas.

I’m trying to create an array formula which will expand in the width (columns) and height (rows) infinitely, to lookup the count.

So instead of having an arrayformula in each cell in row 3, there will be just one in F3

enter image description here