In a ruling that could encourage states to impose their own restrictions on the hiring of illegal aliens, the Supreme Court on Thursday upheld an Arizona law that penalizes employers who knowingly hire unauthorized foreign workers.