How do I determine if a certain term is in an array?

It depends on what kind of type are the values from your $product_terms array.

If you have strings there, like term slugs, then you probably want to check if $term->slug exists.

If you have objects, then make sure the array is indexed, and not associative. For associative arrays use array_key_exists() instead.