If you look at what $columns contains, you'll see it is a two-dimensional array. You need to loop through it after your query to extract the relevant information; in this case - the field names.
PHP Code:
$columnquery = $db->query_read("SHOW COLUMNS FROM table");
$columns = array();
while ($column = $db->fetch_array($columnquery))
{
$columns[] = $column['field'];
}
Then you can run the in_array check.