How do I populate an address field in php?
But what are the address field element and how do I get a list of them?


You can get a list of the available field columns from addressfield_field_schema():


country
administrative_area
sub_administrative_area
locality
dependent_locality
postal_code
thoroughfare
premise
sub_premise
organisation_name
name_line
first_name
last_name
data



  Can they be anything I want?


Not by default, but as the addressfield module uses ctools plugins, it's easy to extend to add your own if necessary (see the Address Field Phone module for inspiration).


  Does the create content form create the array when the form is submitted and therefore the form labels are just a guide


Exactly right, the addressfield module provides labels and fields based on the currently selected country. They can be whatever suits the locale, but if you look at the names of the form elements, or inspect the field array on form submissions, you'll see they always match the keys from the field schema hook above. There's an excellent answer to a question on SO which goes some way to explaining the reasons for this implementation.

For a UK address specifically, you would populate it roughly like this:

$node-&gt;field_address[LANGUAGE_NONE][0] = array(
  'organisation_name' =&gt; 'Company',
  'first_name' =&gt; 'Joe',
  'last_name' =&gt; 'Bloggs',
  'country' =&gt; 'GB',
  'thoroughfare' =&gt; 'Street address 1',
  'premise' =&gt; 'Street Address 2',
  'locality' =&gt; 'Town/City',
  'administrative_area' =&gt; 'County',
  'postal_code' =&gt; 'SW1 1AA',
);