How? I don’t think you can. There is no way to check if item has availability in the central warehouse (without enabling local pick up in the central warehouse, which in most cases should not offer pick up).
I.e. store_availabilities will not return the warehouse if it does not have local pick up enabled (https://shopify.dev/docs/api/liquid/objects/variant#variant-store_availabilities)