Actually you wouldnt need new fields but simply a way to relate the records together (ie user ID) and insert each document as a new record.
I havent tried and I dont have my FM platform handy but I dont think you can access the manage database features via scripting.
FileMaker cannot dynamically define additional fields, but that is not needed for this task. Instead of creating additional fields, you create additional related records.
You can use this setup:
MainTable::PrimaryKey = Documents::ForeignKey
Where PrimaryKey is an auto-entered serial number field and you define a single container field in the Documents table. Now double click the line linking MainTable to Documents and select "Allow creation of records via this relationship".
This puts the necessary details in place so that you can add a portal to Documents on your MainTable layout, with the container field located in the portal's row. Your users can now insert as many documents as they need (one at a time) by clicking into the container field of the next blank row in the portal and then selecting insert file from the Insert menu.
There are other ways that this can be done, but this is one of the simplest ways to set this up.