Multipartite entanglement detection via structure factors