Add array length check to array util
Change length check
Split `merge` into its own function
Merge branch 'utils'