Check your implementation because the described method works perfectly:
_array = [["A", "B"], ["C", "D"], ["E", "F"], ["G", "D"]];
_msg = format["init:%1\n\n", _array];
// Removing any element with a "D" inside
_i = 0;
{
if ("D" in _x) then
{
_array set [_i, objNull];
};
_i = _i + 1;
} forEach _array;
_array = _array - [objNull];
_msg = _msg + format["end:%1\n\n", _array];
hint _msg;