User Profile add Country Dropdown

We have a custom attribute on our user object for the Country Code (ISO 3166 Alpha 2).
I have customized the account.ftl with the following code:

<select class="form-control" id="country" name="country">
    <#list countryList as code,name>
        <option value="${code}" ${(account.attributes.country!'' == code)?then("selected")}}>${name}</option>
    </#list>
</select>

My problem is that I have no way to populate the requestAttribute “countryList” that I know of. For the User Registration page we created a FormAction class and modified the registration flow to call our form action, which populates the request attribute. I don’t know of anyway to accomplish this for the profile

We are using Keycloak 15.0.2

I also saw that the new user profile would allow us to create a custom field countryCode which I could set as required, and use the annotations to define a hardcoded list of values. Is there anyway to retrieve a list of values from somewhere else?