Yes, using ValueTrees would be fine.
I’m now using a container called NamedDoubleArray which is a STL pair of a name
and a vector of doubles. The segment name is ‘m’,‘l’,‘q’,‘b’ or 'c for
move, line, quadric, cubic and close as seen in your code.
A vector of those containers allows me to access the points per index.
Actually I think a small segment node class with polymorphic behaviour would fit better. A path would be a node holding segments and a segment could also be another (sub)path to build a hierarchy.
A node hierarchy would provide the ability to replace a subpath with a line segment or vice versa.
What are your plans with this ‘vector path editor’ ?