Sine wave function as an input value? It is possible to use the variable #frame in an input field to make the value increment with each frame. It behaves as a Driver.

Example: 



We can also halve or double the rate using #frame/2 or #frame*2 respectively. So I got to wondering to what extent we can write expressions in input fields. How complex can we get?

Is it also possible to input a sine wave as an expression?

The purpose would be for quickly animating objects that move cyclically:
Sure, why not. The # symbol in the input field tells blender that you are inserting scripted driver with no variables. Everything after # will be put into the driver's expression field.

You can get a list what functions are build-in by typing bpy.app.driver_namespace[' into the console and hitting CtrlSpace.

You can totally input #cos(frame*pi/20) to match the curve you provided in the question.