Creating field on each node I want to add a field on each node which links to a particular page where module's controller will act. I want to actually add a link at bottom of node, and I want to do this programmatically. But I am not able to start, and I am very new to this.

Any ideas or suggestions to get me started? Or give me some reference in Drupal core modules or some other type of sample code to do so?
I have done this till now to add the link:

function module_entity_view(array &amp;$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode, $langcode) {
if (TRUE) {
  $entity-&gt;content['links']['module'] = array(
      '#theme' =&gt; 'links__entity__module',
      '#links' =&gt; $link_builder-&gt;buildLinks($entity),
    );
 }
}


but till now got no success. Am I using correct hook?Also I think that now the question makes sense.
If you have a link field added in your content type then there is no need to render the field programmatically. As I understand with your comment, you need to add field value programmatically.  So in drupal 7 it was hook_node_insert and in drupal 8 it is hook_ENTITYTYPE_insert. 

So in drupal 8 your hook_node_insert will look like following :

function hook_node_insert(Drupal Core Entity EntityInterface $node) {
  // Change node object how you wanted.
}


Helpful Links :

https://www.drupal.org/node/2294409

http://www.drupalcontrib.org/api/drupal/drupal!core!modules!node!node.api.php/function/hook_node_insert/8