Cornstarch is derived from the endosperm of the corn kernel, much like flour is derived from the wheat endosperm. The difference between cornstarch and cornmeal is that the entire corn is ground into cornmeal. Masa harina *is* a finer sift, however it is still the entire kernel that has been soaked in lime juice. The acidity of the masa harina provides a particular type of structure versus that of cormeal because the proteins in the corn have been modified. They are not adequate substitutes for the other.
To use any as a thickening agent you must apply the proper methods. If you want to use a cornstarch as a thickening agent, it is applied to hot liquids and thickens at a boiling point. You would use masa and cornmeal like flour, however due to the fact there is no gluten in either, you would create a very dense product (in some cases you want that). If you are making soups, you can use masa or cornstarch, however the cornmeal would give your soup an unappetizing mouth feel (and keep in mind masa has a particular flavor that you may or may not want).
To thicken with flour (or masa/cornmeal) you would want to make either a "beurre manie" or a roux. To make a beurre manie, warm butter and then stir in your flour until you have pea-sized balls which would then be stirred into a hot liquid. To make a roux, you heat and melt fat and then slowly add your flour, stirring constantly, and cook until degree of brownness desired.