You need jdbc4 then you can use setArray!
In my case it didn't worked, as the UUID Datatype in postgres seems to still have its weak spots, but for the usual types it works.
ps.setArray(1, connection.createArrayOf("$VALUETYPE",myValuesAsArray));
Of course replace $VALUETYPE and myValuesAsArray with the correct values.
Remark following Marks comment:
Your database and the driver needs to support this! I tried Postgres 9.4 but I think this has been introduced earlier. You need a jdbc 4 driver, otherwise setArray won't be available. I used the postgresql 9.4-1201-jdbc41 driver that ships with spring boot