What is this strange horned, slug-like coral reef dwelling creature?
Here is your animal in Blue Planet II trailer:



This is a sea cucumber (Phylum Echinodermata, Class Holothuroidea).

More specifically, this is a sea cucumber from the Species Pearsonothuria graeffei, the Graeffe's sea cucumber.

Here are other images of Pearsonothuria graeffei for comparison:





Sea cucumbers have an antero-posterior elongated body, as you can see in this image of the whole animal:



Those black structures you see are the tube feet, a distinctive feature of Echinoderms.

Here is a detailed image of the tube feet in Pearsonothuria graeffei: