PostgreSQL Operator Class for index support of custom operator
For trigram support, you can try the parray_gin extension

WHERE domains @@&gt; ARRAY['www.foo%'];


If you just want to do prefix matching (more efficiently than that provided by trigram), I don't think there is any way you can do that without writing some C code to glue the pieces together.  I think you would then work on the array type directly, so wouldn't need the ANY, and so wouldn't benefit from the reverse_like operator at all.