Instead of going for a complex nested array, I decided that it might be best to keep it to simple two level set of arrays.
$x = array(
101 => [ (int $parent_id), (bool $completed) ],
102 => [ (int $parent_id), (bool $completed) ],
103 => [ (int $parent_id), (bool $completed) ],
104 => [ (int $parent_id), (bool $completed) ],
...
);
I realized that I was looking for something simpler like what python offers with its “list” data type. I feel like this is about as simple as I could get with storing an unorder list in PHP/MySQL. Anyone got anything better?