Nice work! Have you considering combining ARRAY_ALG_TYPE and ARRAY_ALG_PREFIX into a single function-like macro? ARRAY_ALG_TYPE_PREFIX(int, intv_), for example, can set up all the other macros. I would also recommend adding a ARRAY_ALG_ prefix to the NAME1, NAME2, NS, and T macros so that you don't redefine any previous macros with these names.