How to use IN array properly in WordPress?

You need to have your replacement placeholders matching the number of values in your array, and then you can use the array as one of the prepare arguments.

Proof of concept:

$a = array('course_3202','course_3201','course_3200','course_3199');

$b = array_fill(0,count($a),'%s');
$b = implode(',',$b);

$sql = "SELECT * FROM $wpdb->postmeta";
$sql .= " WHERE meta_key IN ({$b}) and meta_value=1";    

var_dump($wpdb->prepare($sql,$a));

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)