LuaSurface.train_station_available(station_name :: string) -> boolean
Returns true if there is at least one enabled train stop on this surface with the given station name.
[Request] Check train station availability by name
Re: [Request] Check train station availability by name
Train stations are grouped by name, not by surface.
And apparently trains currently make no distinctions for rails or stations on other surfaces, so putting this on LuaSurface doesn't make much sense (i see where you're going with it though).
What's wrong with doing this search manually yourself?
Factorio lua in its current shape is quite capable of doing this no problem without any changes needed.