When you need to filter data by a list of values (for example, IDs: 1, 2, 3), you should use the ANY operator combined with pq.Array from the PostgreSQL driver.
ANY
pq.Array
This task is not that simple, especially with GORM.