"All genes have a function" <- this is a generalist statement that is wrong in its specifics, but also raises semantic question of what "function" actually means.
A lot of studies have shown that literally taking up genomic space is a function. So by definition, all genes have a function. Non-genes have functions. The topological organization of genomes is a function.
This is a bit of a semantic argument, but gene function is a fairly nebulous term. The essence of what I am saying is that there may be proteins that currently have no actual function, aren't under functional selection, yet are duplicated, transcribed, and expressed (not just pseudogenes).
Function is a rabbit hole. Biologists get in big arguments about the semantics of this all the time (http://cryptogenomicon.org/encode-says-what.html). I don't really care. I care about the minimal set of necessary proteins for a model organism to exist and reproduce in a media-rich environment. And, whether there are actually subsets of mutually compensatory groups of proteins instead of a single minimal set.
Protein function is one of those things that, at first, seems really simple to define, but the further you go down the rabbit hole, the more complicated it gets, until it's fractally complex and you realize that not only does the exception prove the rule, it's all exceptions.
I think the semantics are largely dependent on the level of abstraction you are reasoning at. Here I use abstraction loosely to refer to conceptual or physical scale / granularity / resolution. For example, we are (probably) both using the term “gene” as shorthand for the concept of “gene or gene product(s)”. Likewise the term function can refer to phenomena occurring on molecular, cellular, etc length scales, or more amorphous groupings of phenomena such as “flux” through a biological pathway.
But if you really drill down into the nitty gritty, then the “function” of a “gene” is its complete set of state altering / modifying relationships with other bio entities. In this sense, all bio entities have functions because they all have functional relationships with other bio entities.
So yes, all genes, pseudo genes, isoforms, etc have a “function” even if it is redundant, taking up space, or just soaking up some of the pool of tRNA.
Also the minimal genome stuff is pretty fascinating! One of the best research questions I’ve ever heard was, “what are the essential genes of unknown function doing?”
The problem is that proteins do some things passively unrelated to (say) their enzymatic ability. Is that secondary functionality a function? What if it's binding a molecule, but then releasing it before the catalysis occurs (wasted effort).
I mean, I know a person in grad school who worked on finding the function of a protein for a long time. It was given by a collaborator and had high sequence similarity to a known enzyme in a related species. She tried every possible functionality test to see if it was a protease, or any of a hundred other enzymatic reactions. Eventually it turned out the collaborator had mistakenly given them an alanine-scanned protein with the necessary functional residues replaced, so she never detected any activity because there wasn't any. Does that mean the protein had no "function"? It was binding water molecules, even plausible substrate, but just never helping a transition state form. Even if you replaced the working version of the protein with the broken version in an organism, if it wasn't a completely necessary protein, it would continue to reside in the genome with no function for some time until (perhaps) neutral mutation due to lack of functional selection caused the protein to be non-expressed and it starts to rot away into a pseudogene.
The main problem with your research question is that it still hasn't been completely resolved- there are proteins remaining which are necessary, but their functions are unknown.