How can I check to see if a specific string is inside an array

I tried searching a bit for this but the phrasing makes it a difficult search. I’m looking for the unity way to simply do this:

var physics_objects = ["some_prefab_2", "some_prefab_7", "some_prefab_8"];

if ("some_prefab_2" in physics_objects) {
    do_something_with_physics("some_prefab_2");
}

What is the approprate way to do this in Unity. The “in” operator doesn’t seem to work from Javascript. Thanks!

EDIT: I would like to avoid looping through an array of strings if possible unless there is no built in method that would be more efficient.

The way to check the contents of your array:

if(Array.IndexOf(physics_objects, "some_prefab_2") > -1)
// Do something