I have the following data:
name id url John 1 someurl.com Matt 2 cool.com Sam 3
You need to use an aggregate function; array_agg should do what you need.
array_agg
SELECT array_agg(s) FROM (SELECT name, id, url FROM the_table ORDER BY id) AS s;