You can use the built-in generate() function to execute an arbitrary system command on the master during catalog compilation. You can write a custom function to do the same. You can run your command via Ruby code embedded in a template, via the template() or inline_template() function.
Having said that, what you are describing sounds like a bad idea to me. If you want your Puppet clients to obtain files originating on some third server, then why not have them retrieve those files directly? Doing so would spread the load better, and would minimize the risk of accidentally trashing your Puppet master by copy the wrong file into the wrong place.
John