Optimization of multiple arrays for filtering
There may exist a way to make this particular loop run faster.  In fact, I'm sure there probably is... however, it's kind of a futile effort.

There's a lot of time also being wasted elsewhere where we're creating these original three arrays we're passing in here.  We need to take a far more OOP approach to this problem.

I don't know what this code actually represents, but for now, I'm going to use "Phenotype" and assume that's an accurate noun to give to the object that the JSON data is trying to describe.

The way the JSON data is structured suggests that the these three data points are obviously tied to each other.  We don't need to create three separate arrays and somehow rely on a common index among them to remember what goes with what.  Let's make a container to hold all of this information:

struct Phenotype {
    var phenotype: String
    var SNP: String
    var data: String
}


(The struct name and its variable names are probably far from optimal.)

Now, when we parse out the JSON data, we create a single array of instances of our Phenotype struct rather than three arrays of the different types.

Now we don't even need to write the method in your question, because we can do it with the built-in filter method:

let limit = someValue
let dataFromJSON = someFuncCreatingArrayOfPhenotypesFromJSONData(data)

let filteredData = dataFromJSON.filter { $0.data &lt;= limit }


And filteredData represents exactly the data your method was trying to extract.