Statistics for Data-driven Structure Detection in Optimization: Decomposition, Hub Location, and Brain Connectivity