Is $page only an array important for theming purposes? I know Wordpress theming, but I am a beginner with Drupal theming. Drupal render array totally confuses me. 


Do all modules put their content in the $page array?
Is $page only an array that is important for theming purpose? If the answer is no, then what kind of renderable arrays are available in Drupal for advanced theming?
There is just a type of render array, and it is the one described in drupal_render(); the form API extends the render array with properties necessary to validate/submit a form element. The purpose of a render array is just to theme elements present in a page; it is not used for other purposes, if not rendering/theming.

The output of a module is always part of a render array, except when a module implements code similar to the following one.

  function mymodule_menu() {
    $items['abc/def'] = array(
      'page callback' =&gt; 'mymodule_abc_view',
    );
    return $items;
  }

  function mymodule_abc_view() {
    echo "&lt;html&gt;&lt;head&gt;&lt;title&gt;Error&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;span&gt;Error page&lt;/span&gt;&lt;/body&gt;&lt;/html&gt;";
    drupal_exit();
  }


If you visit http://example.com/abc/def, there isn't any render array involved in rendering the page.