how implement a UArray with a ForeignPtr?