MV Array work question.

I'm using a single variable set up as an array to keep track of farming fields. The farm field variable tracks 4 pieces of data per field, and will eventually wind up holding up to 400 entries.
This array length changes based on how many fields are planted, and using a simple step tracker for crop maturity, I am able to notify the player when a field or fields are ready to harvest. The problem I'm having now is I need to remove the relevant field entries from the array. I can't just set the data to 0's because I'm using the length of the array to determine how many fields are planted.

Here's a psuedo code sample of my harvest event:
Set Farm Loops var to the length of the fields array.
divide farm loops by 4 (stride length) which controls when I leave the loop.
Set Crop Value to 3, Set Field Ready to 2, Set Crop Yield to 1, Set Crop Name to 0.
Loop
Temp var = $gameVariables.value(FARMARRAY)[$gameVariables.value(Field Ready)];
if var == 0
{
This crop is ready to harvest. Here's where I need to remove each array element related to the variables I stored for the field.
}
Increase Crop Value, Field Ready, Crop Yield, and Crop Name by 4;
Decrease Farm Loops by 1.
if Farm Loops == 0 Break Loop.

I can't use pop because that takes off the end, and the other function I know takes off the front, but since the crops each have various maturity times, I can't say for sure where in the array the field that has matured will be. Although when I plant crops I'll just be adding the new data to the end of the array.

Can someone point me in the direction of the array function I'm looking for?
I don't think you've provided enough information. What is ID? What is Field Ready ID? You aren't showing where you are setting those or changing them as you iterate.

You could use my Multi Timers plugin to do this.
Crops are ready when their step field reaches 0. in my step track script, it loops through the whole array finds the values related to ready, and if they are > 0 then it subtracts until it is 0. when one becomes 0, it notifies the player. So if I have an array like so...
4002 Farm Fields.
and I say $gameVariables.setValue(4002, ["veggie", 16, 300, 16, "fruit", 9, 200, 10, "tree", 4, 400, 5]);
Once the player has taken 200 steps, the fruit is ready to harvest. Now I need to remove "Fruit",9, 0, 10 from the array, and set the array to ["veggie", 16, 100, 16, "tree", 4, 200, 5];

I guess I could make a new array as I'm stepping through the array to get the data and copy each set of data to the new array that isn't being harvested, and then clear the old array, and copy the new array to the old array just before I leave the loop. But I was hoping for a command to just 'pop' the relevant entries out of the array without re making it each time.
to create arrays, you need to provide them first:

let array = [1, 2, 3, 4, 5, 6, 7]; // or name them like, one, two, three, four, five etc (any name works)
$gameVariable.value(x, array) x = variable ID.

to remove 1 from it's subject or from start or random, there need some more
codes to read those correctly.
to create arrays, you need to provide them first:

let array = [1, 2, 3, 4, 5, 6, 7]; // or name them like, one, two, three, four, five etc (any name works)
$gameVariable.value(x, array) x = variable ID.

to remove 1 from it's subject or from start or random, there need some more
codes to read those correctly.

All I was looking for was a command to remove '3, 4, 5' from the middle of the array and return 1,2,6,7.

But apparently I'm just not smart enough to figure out how to ask that question.
👋 No worries! Sounds like you want Array.splice:
Example:
JavaScript:
// Store array in game variable 1
$gameVariables.setValue(1, [1,2,3,4,5,6,7,8]);
// Starting with element index 2 (first element is index 0) remove three elements
$gameVariables.value(1).splice(2, 3);
// Test output! (F8 to show console during playtest.)
console.log($gameVariables.value(1));
👋 No worries! Sounds like you want Array.splice:
Example:
JavaScript:
// Store array in game variable 1
$gameVariables.setValue(1, [1,2,3,4,5,6,7,8]);
// Starting with element index 2 (first element is index 0) remove three elements
$gameVariables.value(1).splice(2, 3);
// Test output! (F8 to show console during playtest.)
console.log($gameVariables.value(1));
Exactly the command I needed! Thank you so much!

Original thread: https://forums.rpgmakerweb.com/threads/array-work-question.131015/