Dynamic number of parameter to save to the host and to get them

You can create all possible XML structures with the JUCE XML classes. You could create a list of child XML Elements that have their own attributes and add them to a parent node: