Add schema handling primitives

This adds generic capabilities for schema handling. It is anticipated to be reusable in many scenarios.