Getting values out of functions

I have a function that I want to get an array out of. Do I just return the array to the function, and when I call the function set it equal to a variable?