Checked() function on a multidimensional array

The question is from a long time ago but, just for reference, in this particular case and if somebody simply wants to use the checked function with what seems to be an array (instead of doing the test and output ‘checked` on the spot) here is a drop-in solution:

checked( in_array( $shopCategory->term_id, $term_meta['ss_aff_categories'] ) )

This works because checked can take only one argument and compare the value of it with the default second argument which is set to boolean true. So in this case, if the $shopCategory->term_id value is in the $term_meta['ss_aff_categories'] array the in_array function will return boolean true. Ultimately, the value that we pass to checked, along with the default second argument of checked, are converted to strings and compared.