For the method I am suggesting, you would create a case in SAM to generate the Python code at first, and then you would modify the Python code to make changes to the system design and run simulations in Python. So, you would just need to set things up in SAM once.
For example, you could set up a model in SAM for a 10 MW PV system using the Detailed Photovoltaic model and PPA Single Owner financial model, and then use the code generator to create Python code to set up that system and run some tests to make sure things are working correctly. Then you could modify your Python code to change the value of some inputs to change the size of the array, or use different module parameters, costs, etc.
Best regards,
Paul.