How to display entity properties using hook_entity_view_alter? Help with syntax
Accessing the entity

hook_entity_view_alter does not have an $entity parameter. This is a problem that has been addressed in Drupal 8 (see https://drupal.org/node/1618140).

In the mean time you can't be certain that the entity is available, because it depends on the function that invokes hook_entity_view_alter in the first place. Anyone can invoke hook_entity_view_alter, any may (or may not) provide you with the entity in the build array.

The EntityApiController from the entity module (which is not core, but is a requirement for eck) adds a '#entity' field to the build array which contains the entity. My feeling is that it should be safe in most cases to rely on this, but you can't be 100% sure that it will be there.

Here is an example, assuming a required field 'field_mycustomfield' which has a 'value' property (eg. simple text field):

function mycustommodule_entity_view_alter(&amp;$build, $type){
  if ($type == 'mycustomentity' &amp;&amp; isset($build['#entity'])){
    $value = field_get_items($type, $entity, 'field_mycustomfield');
    $build[] = array(
      '#type' =&gt; 'markup',
      '#markup' =&gt; "My custom value: " . check_plain($value[0]['value']
    );      
  }
}


Adding values to the build array

You have a small mistake in your code: to be able to modify the $build parameter, you must take that parameter by reference (as showed on the documentation for hook_entity_view_alter). Look at my example above and notice the &amp; before $build.