refactored array test so that it could be used for dump_xaddr test