Pass variant array by reference to avoid copy