I got a bit confused in this lecture

Why are we using a TArray function to create an array of valid words instead of a void function? Can I get the same result using a void function?

What do you find confusing about it?