If you are talking about the DragCreatingTool specifically, you could override DragCreatingTool.insertPart (or just modify the code) to call the base method and then modify the resulting Part or Node however you like, including by setting properties on the Part.data.
The natural place to store that information is on the Model.modelData object, which will exist even if there are no nodes or links at all. I assume an Array as a property value would make sense. You’ll want to extend your model loading code to first make sure all of the layers listed in your modelData object exist in the Diagram. Then you can replace the Diagram.model to cause all of the Nodes to be created. If you have a Binding on Part.layerName, the parts will automatically be assigned to the appropriate Layers.
On saving the model, you’ll want to make sure that the modelData object has your array of layer information on it. Model.toJson will automaticalyl write it out. I recommend not saving information about any temporary layers (i.e. where Layer.isTemporary is true).