Move unsafe array functions into new module