The parameters to be optimized are passed in as an argument to the objective function. These values represent the parameters in the model that are to be fit to the data. Most models have fewer than a dozen parameters. You can copy these values to local variables, such as mu=param[1], but you can also use the param vector directly in the MLE equations, such as SUM(param) or SSQ(param) or MEAN(param). So no, you do not have to copy them to a local variable.
The data are fixed. The data values are not to be optimized, so the data vector is sent in as a GLOBAL variable.