A wish need not always be expressed with layta (ليت). The source also discusses hal (هل) and law (لو) as ways of voicing longing. Their outward form resembles a question or conditional construction, while the communicative aim may be a wished-for result.
«هَلْ لِي مِنْ شَفِيعٍ؟»
Would that I had someone to intercede for me!
«لَوْ تَأْتِينِي فَتُحَدِّثَنِي»
If only you would come to me and speak with me.
When the first sentence genuinely seeks information, it is an interrogation. In a context of despair it conveys longing. The crucial analytical skill is to separate the particle's ordinary construction from the rhetorical purpose established by context.