Required for https://github.com/CQCL/guppylang/pull/616. Signature `forall n, T. (() -> T) -> array<n, T>`