Ensure proper Array type before processing