You can do this with any type of bowl shaped eye socket.
Dave Lowe has a great example of a giant monster following eye so you get how this effect works, and then you can scale it to the size (and add another eye) to get the effect for a fake pumpkin.
While this is a step beyond the simple optical illusions that the eyes can give you with your Funkin, this is an idea that we hope to use in the next year or two as we get a bit more experience with the use of arduino units. We have a large pumpkin with a knife stabbed in his head held by the skeleton hand that's he's eating, and I think it would look great following people who walked by it. It would require a direct lighting source that would cast a shadow on the pumpkin, but the effect really is wonderful.
Oh... and this one is insanely funny to us. While it might not look like it's following you exactly, I'm pretty sure at least one eye will seem that way no matter where you are.
This is an old thread but I did exactly what you are describing. I used a Funkin pumpkin and cut out holes just slightly smaller than the size of a ping pong ball. Then I sliced a ping pong ball in half, painted it and glued it in. That part was a pain. I also shaded around the ping pong ball so light would shine through. The weather was so bad last year I wasn’t able to put or leave much out so this one has been sitting around waiting a year and a half for its big debut...