I would use split() function instead of arrayformula() and rept() function to repeat cell positions. For example, if your n=4 the formula will look like this:
=split(rept(C1&";",4),";")
rept() repeats cell position C1+semicolon four times creating a string and split() function divides created string by semicolons to horizontal cells.
You can rotate resulted horizontal table to vertical table using transpose() function:
=transpose(split(rept(C1&";",4),";"))
And yes, you can use it to create dynamic formulas with help of arrayformula() function:
=arrayformula(count(D:D)*split(rept(C1&";",4), ";"))