Tamil Nadu was under the rule of the East India Company in the 18th century, as was most of southern India. Prior to that there were many European trading companies in the south, particularly the Dutch, which could explain the "Wilhelm" part of the name, and the Portugese. Perhaps the family had connections with, or worked for, one of these companies.
There were plenty of jobs for ex-pats in the civil service, the railways, revenue collection, and the justice system, and plenty of opportunities for entrepreneurial foreigners to make money.
In 1858 the rule passed over to the British Government.
Tony