move clonearr/freearr to common