I suspect something is happening with the assignment operator :=, as those double quotes seem to indicate the subarrays are being cast to strings?
I tried casting during the assignment, i.e. the_tables[1] := array[new_table_schema, new_table_name]::text[], but that had no effect.
Does anyone know what I might be doing wrong?
I cannot adequately explain the behavior though you are likely correct that since the multi-dimensional array's type is text that the attempt to assign an array to an element converts the array to text instead of assigning the array.
Two suggestions:
1) Use the array modification operators defined here: