Yeah, even "normal" fonts have ligatures (a couple common ones in many fonts are fl and ti though they don't appear to be used in the font being used to render this comment), so this is definitely no technical obstacle if one really wants a font. Obviously a bunch of work to create, but pretty cool to have!
Fonts have supports for that. I know that the Urdu Jameel Noori Nastaleeq font, has hundreds (maybe more) of complete words hardcoded into the font.
Arabic language letters change based on their position in the word. And there's multiple fonts for it.