My apologies for the title, I did not know of a better one.
So, basically, I have a 1D vector, which I extract 256 pieces of data from this, until there is no more data left.
std::size_t begin = 0;
std::size_t nextEnd = 0;        
while (nextEnd < signal.size()) {
  begin = nextEnd;
  nextEnd += 256; 
  Transform(signal, begin, std::min(nextEnd, signal.size()));
}
Inside the "Transform" function, there is a new, temp vector created called temp_vector and inside my main I have a global 1D vector. 
What I want to do is, every iteration of this loop, the values of the temp_vector is pushed back into the global 1D vector at the right position. 
So for example:
std::vector<double> global; 
std::vector<double> actual = {1,1,0,0,2, 3, 4 ....., n};  
// here loop over n number of elements 
// TRANSFORM:
   // std::vector<double> temp_vector = {10, 50}; // after calculations 
   // global.push_back(temp_vector); 
So at the end result, the global_vector will still be a 1D vector, however, will contain all of the values, in the same place for each of the elements. 
I hope I have explained myself enough!
 
     
    