Not very sure if this is what you want. It looks like you want to save a collection of features generated in the application.
Possible solution:
You can publish an empty feature service, add it to your app as a feature layer, and then save the features you want to
the service using featureLayer.applyEdit() method.