Move array_* helpers function to Arr class