1. I believe we have lots of memory. How much is needed to read one array of 30K float number?
it is not too much - about 120KB
2. What do we need to avoid possible repeated detost, and what it is?
any access to array emits detoast - so repeated access to any field in array is wrong. You can read a complete array as one block, or you can evaluate a array as table - and then detost is processed only once.
3. We are not going to update individual elements of the arrays. We might occasionally replace the whole thing. When we benchmarked, we did not notice slowness. Can you explain how to reproduce slowness?
you can see this example
postgres=# do $$ declare a int[] := '{}'; begin for i in 1..1000 loop a := a || i; end loop; end; $$;
This code is fast only for small arrays
10K ~ 100ms
100K ~ 10000ms
postgres=# do $$ declare a int := 0; begin for i in 1..100000 loop a := a + 1; end loop; end; $$; DO Time: 88.481 ms
overhead of plpgsql cycle is about 100ms
but you can generate a array by fast way (but should not be by update)