The two most common sources of strange mechanical noises on the XT660 motor are:
(1) Loose crank nut - RHS.
http://www.xt660.com/showthread.php?t=23951
(2) Loose decompression pin and/or incorrectly setup decompression mechanism - top end LHS.
http://www.xt660.com/showthread.php?t=24187
The noises generated by both these problems can resonate round the whole engine/frame area so are difficult sometimes to pinpoint and aren't always necessarily heard next to the source.