Those on temporary visas were mostly visitors to the U.S., but could also include students, businesspeople, short-term workers and diplomats, according to an analysis of Department of Homeland Security data.