How do I add a non-exposed field to node programatically?
You can add field via structure->content types-> manage fields in your content type, add field that you want to hide. 

to hide field in a edit-form/node you can use

function yourmodulename_form_alter(&amp;$form, &amp;$form_state, $form_id) {
if (!empty($form['type']['#value']) &amp;&amp; $form['type']['#value'] == 'formtypename') {
hide($form['fieldmachinname']);
]