Construction of self-supporting, hierarchically structured caterpillar-like NiCo2S4 arrays as an efficient trifunctional electrocatalyst for water and urea electrolysis.