Create address field with code

Hello all,

Is there an easy and upgrade safe way to create, from code (custom/Extension etc.) , an address field (so 5 db fields but a single field from the studio > layout section) ?

Kind regards, 

Fred