Combine as much as possible with scalar array handling. PVStructureArray becomes PVValueArray<shared_ptr<PVStructure> > Bulk of shared implementation moved the PVVectorStorage which has a parametrized base to avoid using multiple inheritance.