Provably getting the FIRST 5 solutions is essentially impossible on a completely general function, as it is trivial to write a function that no general solver that will treat your function as a black box can ever solve.
Even getting 5 solutions can be difficult, since even for a problem with infinitely many solutions in theory, they may lie arbitrarily far out, and at entirely arbitrary locations.
Extracting solution loci from a graph is trivial. You look at the graph. Write down the approximate locations observed. Then start fzero at those points. If you want to do that automatically, it is less trivial, since any automatic algorithm on a general black box problem will be potentially breakable, that is, if you understand the algorithm and you want to break it.
But nothing stops you from a simple search. look for zero crossings.
The problem with a function like cos(x)*cosh(x) -- 1 is things will go to hell numerically, since cosh(x) will go to infinity exponentially fast. So you will then need to locate points where cox(x) is very near zero, and do so very accurately.
Anyway, it is trivial to locate approximate solutions to this. You just need to understand that most of the solutions will lie near roots of the function cos(x). (THINK ABOUT IT!)
Telling you more than that is equivalent to doing your homework though, and this is so clearly homework that giving you code is very much inappropriate on this forum.