Gradient refractive index (GRIN) optics has attracted considerable interest due to the ability to decouple optical performance from optical element shape. However, despite the utility of GRIN optical components, it remains challenging to fabricate arbitrary GRIN profiles and the available refractive index contrast remains small, particularly at the microscale. Here, using mathematical transformations that the authors developed, the electrochemical waveform required to electrochemically etch arrays of bulk Si microstructures into 1D porous Si (PSi) GRIN microlens arrays (MLAs) is determined. This waveform is then used to form high refractive index contrast MLAs containing precisely-defined, arbitrary refractive index profiles. The MLAs are then embedded in a transparent optical polymer, mechanically detached from the host Si substrate, and planarized via simple polishing. Cylindrical microlenses and 1D axicons are demonstrated and characterized, and the optical behavior is found to be in agreement with theory. These MLAs could find applications in displays, photodetectors, and optical microscopy.