I have this table:

I'm looking for this table:

I have searched for array functions (array_agg) and it didn't work as expected.
How can I approach this task? Would I have to loop into this column?
My dataset:
SELECT 1 id, 'protoc1' protoc UNION ALL
SELECT 2 id, 'protoc2' protoc UNION ALL
SELECT 3 id, 'protoc3' protoc

