How to show only attended events in events subpanel

Initialize hook_array before adding to it

$hook_array['process_record'] = Array();
$hook_array['process_record'][] =  .... etc