My question is fairly simple and I am quite surprised I can\'t find anything related. Probably it is easy or totally stupid (or I can\'t search).
As the title says,
If you look at the docs for std::vector you will see the second template parameter is a custom allocator:
template < class T, class Alloc = allocator > class vector;
You can define your own std::allocator that returns whatever memory you want. This may be a lot more work than is worth it for your purposes though.
You cannot just pass in a pointer to random memory, however. You would have problems like, what if the vector needs to grow beyond the size of your initial buffer?
If you just want to operate on raw bytes sometimes, and vectors at other times, I would write helper functions to convert between the two, and just convert between the two when needed. If this causes performance issues (which you should measure), then custom allocator is your next course of action.