I would probably separate the three different destinations, and use something akin to this:

<pre>
legacy_bin = %w[puppetdb-ssl-setup puppetdb-foreground]
internal_bin = legacy_commands
bin = %w[puppetdb]

legacy_bin.each do {|f| cp_pr "ext/files/#{f}" "... }
internal_bin.each do ...
</pre>

That makes it much clearer what fits into each category, and captures the common behaviour in one place.