TL;DR
Comparing array elements is inefficient - how to improve?
Should I use a proper programming language? Which can be recommended?
MATCH (a:example_label),(b:example_label)
WHERE any(temp IN a.list WHERE temp IN b.list)
MERGE (a)-[:relationship]...