So you mean to create files that are PowerShell scripts, or scripts that exist only for the duration of the "Master Control Script" (or until that master control script removes/replaces the variable that contains them), and then run them?
In both cases, you can use Invoke-Command (with either a file or script block), or Start-Job to achieve this, depending on how you want to mange their execution.
The bigger question is how you intend to describe what you want your master control script to do! Would you invent a meta-language? You'd then have to write the code that converts that language into PowerShell.