Relative efficiency of n tasks in 1 loop vs. 1 task each in n loops? Say I have 3 simple tasks, to find the min, the max, and the average of an array of numbers.

A modular approach would be to write one function for each, thus iterating over the array thrice. However, that seems wasteful when all the information can be collected in a single iteration.

I understand that both approaches take 3n time but am wondering if one approach is better than the other in the general case and why.
Collecting the information in a single iteration would be way better, but you'll only notice the difference if your array contains a large number of numbers. On a small scale, it just won't make a difference.