At least four men have been arrested in connection to three incidents across Spain in which 14 people were killed.