You use the callback in a class context, but I see no class declaration. Maybe it was left out, but here’s a possible solution without using class.
function rttk_create_boxes() {
$myarray = $this->rttk_get_posttype_array();
foreach ( $myarray as $key => $value ) {
add_meta_box(
'rttk_' . $key . '_id',
__( 'Details', 'rara-theme-toolkit-pro' ),
'rttk_testimonials_metabox_callback',
null,
'side',
'high',
array( 'key' => $key )
);
}
}
// testimonials template form
function rttk_testimonials_metabox_callback( $post, $args ) {
$key = $args['args']['key'];
include RTTKPRO_BASE_PATH . '/includes/meta-parts/rttk-' . $key . '-template.php';
}