What would be the best way to populate an array through a function or sub, without having to declare it as a global variable ?

Especially, I have run into trouble when I already have some data in the array and don't want to touch that part of it...

Any ideas ?

Thanks