Ah, hm. Try this
1) Create a light with the name Emitter
2) Create a new solid and apply the Particular effect
3) Set the Emitter Type to Light
4) Set Particle Per Second to something high (like 100, 200 depending on how fast it’s moving) and keyframe it at 0:00. Move forward a bit in time (like 15 frames), set a new keyframe with the value of 0. Move forward another 15 frames and set a new keyframe with the value of 100. Toggle all keyframes to Hold (at least the two first).
5) Add the expression loop_out("cycle",0) to the Particle Per Second-attribute.
6) Go to Particle->Life and set it to something that you think seem fit (like the duration of the comp).
7) Go to the light and add the expression wiggle(0.5,100) to it’s position.
If I haven’t forgot anything and you have done all correctly, you should have a dashed line moving around randomly, in 3d-space. The distance of the keyframes for Particles Per Second determines the length of the dashes and empty space. You might need to increase the higher value if you increase the speed in which the light is moving and so forth.
And how you animate your light is up to you.
I took time to try it and upload both the render and the project.
Render
Project file