Reverse engineering

Hello. Is it possible to make a 3d printer for example using arduino produce some code by moving the printer by hand like reverse engineering?for example i imidate the move of cutting vegetable with 3d printer and it produces a code that i can save and use as a template?

What you are describing is not called reverse engineering, it is known as computer teaching.
Yes you can do this on an Arduino, but you need sensors on the thing you are trying to copy that match the controls that you will eventually send it. You could store the template of instructions on an SD card.