Thanks @Andrew H for the tips. I found C4:GetDevices, which returns all devices and proxies, so I wrote a function for creating an array to map proxy IDs to device IDs:
function get_proxy_device_map()
local map = {}
local devices = C4:GetDevices() -- could add filtering options here
for k,v in pairs(devices) do
local proxies = v.proxies or {}
for k2,_ in pairs(proxies) do
map[k2] = k
end
end
return map
end
By mapping the proxy IDs to the device IDs, we were able to access the variables on connected devices.