Please find the new patch here, with your comments taken into consideration.
However, the following comment "Related to the above: I am not sure if it is a good idea to make ELEMENT a reserved word in column definitions. What if the SQL standard wants to use it for something?
I think I prefer (EACH ELEMENT OF xs) over (ELEMENT xs) given how the former is more in what I feel is the spirit of SQL. And if so we should match it as "xs integer[] EACH ELEMENT REFERENCES t1 (x)", assuming we want that syntax." is outside my area of expertise. The original authors should take a look at it (Tom Lane and Marco). They had a whole discussion on the matter, here. https://www.postgresql.org/message-id/6256.1350613614%40sss.pgh.pa.us