I agree with Rob regarding subroutines. Having the parameters be defined in the action is nice.
As for returning multiple values, the "Return from Subroutine" action only allows you to return one value, but as Rob said, you could use a KM Indexed variable method to return multiple values. You could also return a JSON value.
But there's another option too: You could have the macro return Instance variables with the results. You mentioned using global variables as input parameters for your subroutine, but Instance variables are better because they go away when the macro(s) are done.
So in the same light, you could return the results in Instance variables, if that works better for you.
I did not know about them. They look very promising and might help to simply my CSV handling immensely! (At the moment I parse the CSV lines via cut commands in Shell actions.)