In your model you are selecting all the data from your table so there is a multidimensional array returned,In view you need to loop over your results,see docs
foreach ($generated as $row)
{
echo $row['name'];
echo $row['department'];
}
Or i guess if you need a single record from your table then you can use $query->row_array();
in your model and in view you can access them as
$view_name =$generated['name'];
$view_department = $generated['department'];