All-Optical Characterisation and Wavefront Manipulation of Photonic Integrated Circuits