Does WP have a global of $id?

If you are using netbeans and xdebug, or have set up your debugging environment correctly then you can observe the variables, objects e.t.c as they change.

To see when they are created and what is contained within objects such as wp_query or wp_rewrite your posts->ID is set once the function wp() is called in wp-blog-header.php.

I know you asked where the ID is set but you can use this to find other variables and objects that are set by stepping through the wordpress environment. That is if you develop your wordpress sites locally.

Netbeans Variables