> I refactored it in the first place was because @todb-r7 said I shouldn't have the parameters / arguments (terminology?) in such a specific order

A valid concern. So use a hash for your elements instead of an array as I suggested. Regardless, it should be looping over a structure of some kind, rather than duplicating code.