The cube datatype also stores arrays of numbers (cubes or vectors, same thing) and has functions/operators for computing distance. Granted, they're slightly different, with no direct substitute for cosine distance, but on the unit sphere the cosine distance, inner product, and Euclidean distance have direct correspondences.
I looked into this, and (apparently) the cube extension has a very small hard-coded dimensionality limit that isn't sufficient for this purpose; you can recompile it to support more dimensions, but the way it stores data requires the entire vector to still fit within a single database page (which these vectors will not).
https://www.postgresql.org/docs/current/cube.html
The cube datatype also stores arrays of numbers (cubes or vectors, same thing) and has functions/operators for computing distance. Granted, they're slightly different, with no direct substitute for cosine distance, but on the unit sphere the cosine distance, inner product, and Euclidean distance have direct correspondences.