Arbitrary wavefront manipulation