Here’s is a possibility for regularly spaced samples along the x-axis (controlled by the quantity called DX: spacing in pixels between samples).
I can’t check the expression because i’m not in front of AE, hopefully there is no bug:
t0 = 0; // reference time
x0 = 0; // reference x (x position of the cursor at time t0);
speedX = 100; // "cursor" will move to the right at 100px/sec
DX = 50; // one sample for y every 50 px (along x-axis)
yprop = effect("y").slider; // slider control with a wiggle expression (for y position of the cursor)
y0 = 0.5*thisLayer.height; // reference y
//===============================================
dx = (time-t0)*speedX;
u = dx/DX;
n = Math.floor(u);
DT = DX/speedX;
[x0 + dx, y0 + linear(u, n, n+1, yprop.valueAtTime(t0+n*DT), yprop.valueAtTime(t0+(n+1)*DT))];
Xavier