Switch to define arrays using array function