Does the photoelectric effect take place if the frequency of the photon is exactly equal to the threshold frequency of the metal? I know the electron is going to be free, but it will have 0 kinetic energy; it will be stationary. If so, can voltage be still created if the metal surface is connected to a positive terminal side?
If you irradiate a metal with the exact amount of energy to produce a free electron with KE = 0, it will just stay free, in the "sea of electrons" of the metal, while the nucleus, with its positive charge, also sits in the same sea - near "other" electrons, each of which has KE due to temperature. Then, after a while, an electron drops in around that nucleus, giving a bit of (thermal) shock. The observable effect will be that irradiation with this wavelength warms the metal as much as possible without exciting any electrons to the "outside" world.
Now if you attach a negative electrode to the metal and a positive electrode close to the surface, you can push/pull that electron (or one other from the sea of electrons) off - the application of a potential gives KE to a free electron. Actually, you don't even have to irradiate: if you apply enough potential, you can pull electrons out of a metal. If you heat the metal, the electrons will come out more easily.
This is the basis of the Edison effect, which makes vacuum diodes possible: a heated cathode "boils off" some electrons which would stay near the wire, but if you have a nearby anode (an electrode made positive by an outside battery), electron current will flow easily from the heated cathode to the (cold) anode. But not from the cold electrode to the hot electrode. So you can rectify AC current to pulsed DC.