FLOE-119: Utility function for writing metadata

Added a utility function for writing out metadata to an element.