@realquest Thanks for posting your query on Microsoft Q&A.
You can create IP addresses with routing preference - Internet using the CLI with this command:
az network public-ip create \
--resource-group TutorVMRoutePref-rg \
--name myPublicIP \
--version IPv4 \
--ip-tags 'RoutingPreference=Internet' \
--sku Standard \
--zone 1 2 3
You can programmatically achieve your goal using this command, by writing a script for your scenario.
Let me know if that helps.