should be in $question['raw']['categoryname']. $question['raw'] will contain all the information about the question that is in the qa_posts database. If it exists in that table, it will be found in the ['raw'] index - if I am not mistaken. Here's an example list:
["raw"]=> array(49) {
["postid"]=> string(3) "735"
["categoryid"]=> NULL
["type"]=> string(1) "Q"
["basetype"]=> string(1) "Q"
["hidden"]=> string(1) "0"
["acount"]=> string(1) "4"
["selchildid"]=> NULL
["upvotes"]=> string(1) "1"
["downvotes"]=> string(1) "0"
["netvotes"]=> string(1) "1"
["views"]=> string(2) "55"
["hotness"]=> string(11) "1.01265e+10"
["flagcount"]=> string(1) "0"
["title"]=> string(37) "test post"
["tags"]=> string(12) "test,post"
["created"]=> string(10) "1312232998"
["categoryname"]=> NULL
["categorybackpath"]=> NULL
["uservote"]=> NULL
["userflag"]=> NULL
["content"]=> string(1500) "This is a test post."
["notify"]=> string(1) "@"
["updated"]=> NULL
["format"]=> string(8) "markdown"
["lastuserid"]=> NULL
["lastip"]=> NULL
["parentid"]=> NULL
["lastviewip"]=> string(15) "xxx.xxx.xxx.xxx"
["userid"]=> string(3) "590"
["cookieid"]=> NULL
["createip"]=> NULL
["points"]=> string(2) "36"
["isbyuser"]=> bool(false)
["authorlast"]=> bool(true)
["viewable"]=> bool(true)
["answerbutton"]=> bool(true)
["commentbutton"]=> bool(true)
["commentable"]=> bool(true)
["editbutton"]=> bool(true)
["aselectable"]=> bool(true)
["flagbutton"]=> bool(true)
["flagtohide"]=> bool(false)
["unflaggable"]=> bool(false)
["clearflaggable"]=> bool(false)
["hideable"]=> bool(true)
["reshowable"]=> bool(false)
["deleteable"]=> bool(false)
["claimable"]=> bool(false)
["followable"]=> bool(false)
}