How does one see the specific structure of some variable? I'd normally use dpm($variableName), to drill down to the desired data, but I'm currently working on the webform-mail.tpl.php template file, which doesn't exactly allow that.

Most of the Drupal devs I've met seem to have this magical knowledge of how variable structures work, and I want to figure out how they found these things in the first place.

For example, I see people talk about structures like this: $node-&gt;webform['components'][$key]['form_key'] all the time.

How do they find out what's contained inside $node->webform? Is it some functionality in the devel module, or is there an amazing piece of Drupal's documentation that I'm missing somewhere?
You can use kint in a template. Enable the devel and kint modules and you can call it right from your template: {{ kint(node) }}