Advances in 3D fabrication have afforded new freedoms in the design of custom optical elements. We explore a design space where the refractive index may vary freely with position in a material by considering applications in coherent beam shaping. First, we will describe experimental results where we have used femtosecond laser writing to fabricate custom GRIN waveguides in a planar geometry. We show a 2D device that converts a Gaussian beam to a flat top in one transverse direction, and is a single-mode waveguide in the other. Second, we describe a numerical method for designing 3D refractive index profiles. As an example, we will use the 3D method to design a device that transforms a circular beam with a Gaussian intensity profile into a square beam with a flat top.