Few optimizations and simplifications.
2+ times faster is_array_assoc() and `is_array_indexed()`