What's the difference between PostgreSQL array type vs array in json?

Theres a good blog post you might find helpful: https://robots.thoughtbot.com/why-ecto-s-way-of-storing-embedded-lists-of-maps-makes-querying-hard

In general though, Postgresql has a native array type and a JSON(B) type. The Postgres array type can only be an array of simple types. JSON can, of course, be that and a lot more. With GIN indexing of the JSON document I think the performance of the two is sufficiently close to not be a major distinction. But as always its the data structure, desired normalisation and expected access paths the determine which one is more appropriate.