projectfilter: improve filter generation code with consistent use arrays
code improvement done as exception in stable branch, as potentially there
will be more additions of the filter list here, where merging into
a changed code base only in master would become more work