Adding functionality to a form button that would load user details / corresponding field data for "autofill" I have a form that has a address field holding inputs for:
name
address
phone etc.

I've added a button on this form/field: Load my data which I would like to load user details/data.
On click it should load a corresponding address field from user's profile by ajax and use it to fill in form fields.

Form can have multiple address fields so it should know which address field needs to filled with user data.

Button isn't shown to anonymous users of course.
Take a look at how Commerce Addressbook solves these same requirements: https://www.drupal.org/project/commerce_addressbook.

There is a demo video on the project page: https://commerceguys.com/blog/commerce-module-tuesday-commerce-addressbook.

I think if you dig through the module code of that module, you'll find all the logic and code examples you'll need to pull off a similar solution on your custom form.

If you want to see this in action on a local setup, I recommend installing commerce kickstart with commerce addressbook to see how the addresses are organized. 

Good luck, Jason