We have one opclass for each type combination -- int4 to int2, int4 to int4, int4 to int8, etc. You just need to add the new strategy to all the opclasses.
I tried this approach by manually declaring the operator multiple of times in pg_amop.h (src/include/catalog/pg_amop.h)
so instead of the polymorphic declaration DATA(insert (2745 2277 2283 5 s 6108 2742 0 )); /* anyarray @>> anyelem */
multiple declarations were used, for example for int4[] :
However, make check produced: could not create unique index "pg_amop_opr_fam_index" Key (amopopr, amoppurpose, amopfamily)=(6108, s, 2745) is duplicated.
Am I implementing this the wrong way or do we need to look for another approach?