Support for encoding metadata types

This allows declaration of some previously unusable intrinsics.