How to write a function that returns an array?

I accept and agree that it is possible to have the caller pass in the variable address/reference and have the called function put them in that location.

The point I was trying to make is that without using those approaches, and just using a plain old function return value, it is possible to return the array (in its entirety, including all the elements) as part of a struct value returned by the function.

Name myName = getName();