Replace array_helper functions with Arr class

Ref proposal #3528

See also #3533