socket: fixed array remove_at to move a pointer