Pre-allocate result array in getAddress and use Appender in getAddressInfoImpl

Fixes issue #13159