I think you can use the [] operator on a vector to access any location freely. However, since this ignores the bounds of memory the vector has reserved, you will likely need to manually resize the vector unless you know for certain that the location you are editing is valid memory.