Provides a Form API element type 'entity_field' for getting / setting a field from an entity.
eg. given a page $node, with field 'field_foo':
$form['title'] = array(
'#type' => 'entity_field',
'#settings' => array(
'field_names' => array('field_foo'),
'entity' => $node,
will attach to $form the rendered field widget for the field_foo instance attached to page nodes.
Additionally, the field can be rendered with an empty value to create an entity on submit: