Actually, $array[] = 'whatever' is perfectly acceptable and works as expected i.e. it appends new entries to the array.
The statement
$system = explode('.',$dit_bestand);
Assigns an array to $system.
$system[0] will have everything up to the '.' and $system[1] has everything after the '.' i.e. the file suffix.
$dit_bestand itself is not changed.
So just
if ($system[1] == $filter) {
$bestanden[] = $system[0];
}
And remember, arrays are a good thing.