I just tested it myself:
WITH arr AS ( SELECT array_agg((random()*18000000)::bigint) AS id FROM generate_series(0, 10000) ) SELECT * FROM arr JOIN foxo.file ON file.id = ANY(arr.id)
Query complete 00:01:13.853