جَاءَ هَؤُلَاءِ. — These people came; the demonstrative is subject in a nominative position.
رَأَيْتُ هَؤُلَاءِ. — I saw these people; it is the direct object in an accusative position.
مَرَرْتُ بِهَؤُلَاءِ. — I passed by these people; it stands in a genitive position.
The final form stays fixed across all three syntactic roles: that is the effect of indeclinability.