I have two tables in database:
CREATE TABLE items( id SERIAL PRIMARY KEY, ... some other fields );
This table contains come data row with
SELECT I.* FROM items AS I WHERE I.id IN (SELECT UNNEST(id_items) FROM some_chosen_data_in_order (ARRAY[SELECT S.id_items FROM some_chosen_data_in_order WHERE id = ?])