Replace sum_array functions with one anyarray function.