Design and optimization of mini-beam GRID and LATTICE therapy using linear accelerators