Partially supporting them by checking for upper-level buildings after arrival would lead to anomalies because the exact building cannot be determined.
That's a quite simple, still good solution imho.
It's an edge case and, except from building stats and commuting trips, it does not really matter where exactly on the same koord the passengers or mail arrive. Cargo is a different thing, there cannot be any cargo destination above or below ground level, so no need to care about it.
That means, if there is no building at all on ground level, search for any building at that koord which accepts our "ware" (passenger or mail) and send it there.
If it is a commuting trip, search for all buildings on that koord that offers jobs and send it to one of those with jobs available. If there is none, send the commuter anywhere.
I am aware this does not replicate the exact behvior we would get when actually generating passengers with koord3d destinations, but I don't think it's worth the effort and that solution should be good enough.
Looking at the code, using koord3d instead should not be too difficult too. In some places we already get the koord from a koord3d directly, in many cases, we can safely take the 3d koord on ground level from the 2d koord, as industries are always on ground level.
Some cases need a little more attention.
Koord3d is definitely the cleanest option and from the code, I would not expect it to affect performance nor memory consumption very much, so it's definitely a viable option too.
It will just take a lot more effort than the above solution, so I'm not sure if it's worth, given it's an edge case and the above does only affect some stats which is not a big issue.