We could have another filter that maps ($record, $post) -> $record.
function my_miso_post_to_record(array $record, WP_Post $post) {
if (!array_key_exists('custom_attributes', $record)) {
$record['custom_attributes'] = [];
}
$record['custom_attributes']['title_initial'] = substr($post->post_title, 0, 2);
return $record;
}
add_filter('miso_post_to_record', 'my_miso_post_to_record', 10, 2);