Use the HSTORE column type. HSTORE stores key/value pairs. You can use null values if you only care about checking if a key exists.
See https://www.postgresql.org/docs/current/static/hstore.html.
For example, to ask Is ‘x’ in my hstore?, do
CREATE EXTENSION HSTORE; --create extension only has to be done once
SELECT * FROM 'x=>null,y=>null,z=>null'::HSTORE ? 'x';
I believe this is operation is O(1). In contrast, checking for containment in an ARRAY-type column, is O(n).