If a function needs to process a variable number of account objects, which is the BEST solution?

An array account parameter with a loop in the function body.

A set of account parameters with a loop for each parameter in the function body.

An account parameter with a loop for that parameter.

A set of 10 account parameters with a series of if-statements checking if each is null.