Cornstarch mixed with water is shear thickening, but when boiled, it becomes shear thinning (AFAIK), and that is basically what ketchup is. If boiling it, you should use way less starch - it goes a long way. You can also use other other flours as well (not sure how different the performmance is), like you would in Béchamel or custards. I think the shear thinning effect comes from starch gelatinization [1].
I don't have time ATM to go through the whole paper, but it seems like [2] is covering exactly this topic in detail.
I think (but [2] might correct me, I'm just guessing at this point, please don't quote me) that there is no special connection between the mixture being shear thickening before, and shear thinning after boiling - just a coincidence in this case.
Source: sciency-cooking dabbler, don't trust what I say too much.
[1] https://en.wikipedia.org/wiki/Starch_gelatinization
[2] https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.85...