Nope! In all three of the sentences at the end of your question, by indicates location: beside, near, next to, nearby (though the meaning could be shifted by context). To indicate that the pen, the tumbler, or the bowl were the means, you would need another word:
She wrote the answers with a pen.
He usually drinks coffee using a tumbler.
She ate spaghetti using a bowl instead of a plate.
She ate spaghetti with a bowl instead of a plate.
Most common prepositions in English are best understood as elements of phrases, where the phrase as a whole has the meaning, not the preposition by itself independently of a phrase. The dictionary definition of a preposition can often help you figure out the meaning of a given phrase that you came across, but they're not much help for constructing your own sentences with (not "by") the same preposition.
This might make learning English prepositions seem hopeless. I do think that English prepositions are even more complicated than English spelling. Together with this long answer, though, the following might help. Instead of trying to explain what by "means", the examples below show, starting from a specific means or method, how you express it in a prepositional phrase modifying the verb. Sometimes the preposition will be by, and sometimes it will be something else. Of course this doesn't explain all kinds of expressions for means and methods; these just show you how expressing these (and many other) ideas works in English.
Some means and how to express them
To indicate the tool that is operated to perform the action of the verb, you say with:
Chris pounded the nails in with a hammer.
Gag me with a spoon.
You turn a car with a steering wheel.
Little Teresa is ready to learn to eat with a knife and fork.
To indicate the light that provides visibility for the action of the verb, you say by. If it's a type of light, then the noun gets no article:
We ate dinner by candlelight.
We dug the grave by moonlight.
O say can you see, by the dawn's early light, what so proudly we hailed…
We searched for the secret door by the light of my keychain LED.
We danced in the sunlight. (This says where we danced, not how we could see.)
We danced by the river in the moonlight according to the Graham method. (Here "by" and "in" indicate location; "according to" indicates method.)
To indicate the type of transportation vehicle used in the action of the verb, you say by with no article or in with an article. A specific vehicle only takes in:
We'll be traveling across Europe by train.
We traveled across the United States by car.
We drove across the United States in Jason's car.
This time, we're going by plane.
She was taken to the hospital in an ambulance.
The Amish still get across town by horse and buggy.
The Amish still get across town in a horse and buggy.
To indicate a method of payment, you can say by or with, but cash normally takes in or with except as an alternative to another method. In these phrases, and many other "by" phrases for means, "by" suggests indirectness: going through something, like a route. Cash is direct: it really is the money, whereas the others are ways of transferring money via a third party.
The IRS will let you pay your taxes by check or money order.
Most people pay the IRS with a check. (Note the article.)
Will you please pay me in cash? That'll save me a trip to the bank.
We tried to pay by credit card but the machine wasn't working, so we paid with cash.
You can't pay with a credit card here, so you'll have to pay with cash.
This gas station lets you pay by cash, check, or credit card.
William paid cash for his new Camaro. (That is, William did not take out a loan. He probably wrote a check.)
There are various fixed phrases for special means:
Katya can play music by ear.
Little Teresa now knows the multiplication table by heart.
On the Origin of Species by Means of Natural Selection by Charles Darwin
We're conducting this investigation by the book.
Professor Friedman addressed each student by name.
This sweater was made by hand, not by machine.
When in doubt, you can substitute using for most of the prepositions above (but not the fixed phrases). But using is a somewhat hazy word, prone to be clearer to the writer than the reader. It's usually better to say something more specific, like:
She wrote the answers in pen.
He usually drinks coffee from a tumbler.
She ate spaghetti from a bowl instead of a plate.
None of the above is a rule, though. English works by precedents and analogies, not by rules. Just as in English common law, precedents sometimes conflict, and context can often make a normally "wrong" usage reasonable and expected.
The above is way too much to memorize. I recommend not even trying—because then you might start viewing those things as rules. Hopefully they show you how to go about learning prepositions in English: one phrase at a time, following the analogies, noting which are especially well known or canonical phrases that serve as precedents. Notice that I put the whole prepositional phrases in bold. Those are the chunks to pay attention to.