Refactor macros in arrayop.c