$result = [];
foreach ($sourceArray as $key=>$value) {
$dates = explode('-', $value);
$numbers = explode('.', $dates[0]);
$year = $numbers[2];
if (!isset($result[$year])) {
$result[$year] = [];
}
$result[$year][] = substr($dates[0], 0, 5) . '-' . substr($dates[0], 0, 5);
}