You can use BOOST_PP_ENUM as:
include
#define INIT(z, i, v) v[i]
std::vector v;
//fill v with at least 5 items
std::array a = { BOOST_PP_ENUM(5, INIT, v) }; //MAGIC
Here, the last line is expanded as:
std::array a = {v[0], v[1], v[2], v[3], v[4]}; //EXPANDED LINE
which is what you want.