Three-dimensional artificial spin ice in nanostructured Co on an inverse opal-like lattice