For example, I store interests for Joe as chemistry and classical-music (as two separate values) , and you can query the table like where interests in ('chemistry', 'biochem') and it will use the index to efficiently find people such as Joe.
Does PostgreSQL have such a datatype that can index multiple values to allow advanced queries? What are the performance advantages for queriues? And what are the important caveats?
If you use an array datatype, it can be indexed and the index can be used, check this topic: Can PostgreSQL index array columns?
A better datamodel might be a better idea, but that’s up to you.