A ship-to is in general not known as a term in procurement, ship-to is a SD term.
in purchasing your procure usually to a plant or plant/storage location which will default from customizing to the delivery address tab.
In case of a third-party order the delivery address is coming over from the ship-to customer master from the sales order.
In the PO delivery address tab you can also overwrite the address to any other address, this will create a one-time delivery address in ADRC table, just valid for this single purchase order item.
You can further enter a vendor or customer number or address number as delivery address.
While vendor and customer master have a field for the DUNS number , pure address records do not have this information.
In the vendor master you can store the DUNS number in field LFA1-KRAUS, the customer master uses KNKK-KRAUS or has a DUNS number field if you have an interface to D&B in KNA1.
Now you need to evaluate if your current customer master and vendor master records are sufficient and cover all your scenarios. If not then you have to decide if you want create customer or vendors for each delivery address you may want to use in a purchase order, you can do that for example with an extra account group and have to educate your users to always enter either vendor or customer number in the delivery address tab (you may need a BADI or exit) to check if that was done properly.
If you need to print this number on your documents then your ABAPer can fetch the DUNS number via the the given vendor or customer number from the master data tables.
You can as well define a Z-field in eKPO and in a custom view in your purchase order item, can copy the field over from referenced master data if you really need it, or if you want to enter it manually in the PO (but then you could as well just enter it in a long text)
Do you really consider to load all global DUNS numbers and addresses in a Z-table? And who is going to maintain all the numbers which will be created each day?