You can’t just use IN {{array}} in a custom query, as it works differently than inside the query builder. Please check:
IN {{array}}