I would just use SizedArray to hint this:
SizedArray
foo(a, ::Val{N}) where N = reduce(hcat, SizedVector{N}(a))