Stochastic Optimization of Linear Sparse Arrays