The array types
in the first example is declared static. This means it only exists once in memory. So there are three options for what to return and they live in static memory. Then, when you create the vector to return, you are able to allocate it's memory in one shot by passing the beginning and ending of the array as iterators.
By doing it this way, you don't have successive calls to push_back
which means the vector won't have to reallocate its internal block of memory.
Also, when the vector is constructed as part of the return call, older compilers will have an easier time of doing return value optimization.