How can I prevent placeholders to wrap the value with single quotes in db_query?
You're imploding your array into a string, so PDO will (correctly) put quotes around it. PDO can handle arrays just fine, though, no need for manual manipulation:

$nid_array = array(24,34,56,7,8);

$query = "  SELECT *
            FROM {table_name} as t
            WHERE t.nid IN (:list_of_nids)";

$placeholders = array();
$placeholders[':list_of_nids'] = $nid_array;

$result = db_query($query, $placeholders)-&gt;fetchAll();