Refined schemas for enclosing types and array types