Depending on what you're looking to do, you can use a tuple type to get an array of a certain length.
[number, number, number]
[number, number, number]
Is that a feature of other languages?
As to Dhall, for example, I could validate such a constraint (and more) using a function I can be reasonably sure is safe and won’t halt (i.e. without all the drawbacks of TS and other general-purpose languages).