0
TypeScript’s type system, 91 bytes
//@ts-ignore
type F<N,A=[],I=N["length"]>=N extends[...infer R,0]?F<R,[1,...R,...A],I>:A[I]
Try it at the TS playground
This is a generic type F taking a unary number N as a tuple of N zeroes. I never would have expected a challenge like this to be under 100 by...