In American culture, this use of "Are you okay?" is not at all literal. It is a polite and well-understood way of opening a dialogue in which the other party can detail the problems stemming from the situation under discussion (implicit from the context of the question) with which they require either emotional support or more concrete assistance, without actually asking for assistance, and without the initiator overtly suggesting that the other party needs assistance in the first place. Its a means of offering support within the context of America's culture of maintaining the illusion of self-reliance. (OTOH, because of that culture of self-reliance, even this elliptical opening is expected to be declined in most cases with, in most cases, an "I'm okay" or, when that is so manifestly not the case as to be ludicrous, "I will be okay".)
The more direct forms which do overtly reference a perceived need for assistance ("Is there anything I can do to help?" or, even moreso, "What can I do to help?") are generally considered less polite and less acceptable, particularly in public and/or from more distant acquaintances.