Since your inner dimension is constant, I think you want
std::vector< std::array<int, 5> > vecs;
vecs.reserve(N);
This will give you preallocated contiguous storage, which is optimal for performance.
Since your inner dimension is constant, I think you want
std::vector< std::array<int, 5> > vecs;
vecs.reserve(N);
This will give you preallocated contiguous storage, which is optimal for performance.