Move code to core_narray.c