I recommend against attempting to generate manifests dynamically, but you absolutely can use data to drive what classes (among those available) are declared for each machine. Under control of those classes, you can, to varying extents, use data to control which resources are managed on each machine. Connecting external data (YAML-formatted, even) to your classes is what Puppet's "Hiera" subsystem is all about. Instead of dynamic manifest-writing (and re-writing), changing the data is sufficient by itself.
You may also consider looking into Puppet Enterprise, The Foreman, or a similar product that builds on the Puppet capabilities just described. Perhaps one of them would provide some of the other pieces of the picture for you.
Overall, however, your question is both broad and somewhat abstract. It's hard to give any specific advice, but yes, Puppet can play in that arena.
John