Nim is my second language after Python. Python has a universal array type, the "list" type. It has a changeable size and can accommodate any type. I am currently sorting out and studying Nim learning materials. It looks like there are many different types of arrays for all cases - tuples, arrays, openarrays, sequences etc. It's a bit confusing to study. I still haven't figured out if there are arrays with variable size in Nim, and arrays that can include different types of data.
Is there an analogue of the "list" type from Python, which is resizable and accommodates different types of data?
then with these you can create dynamically allocated array. in nim there is already one called seq you can see its sources it uses the same UncheckedArray in its implementation https://github.com/nim-lang/Nim/blob/devel/lib/system/seqs_v2.nim
tuple in nim is more like namedtuple in python than default python tuples. you can give each field a name but still can index it by numbers. https://nimbyexample.com/tuples.html
nim is statically typed language and seq or arrays can contain only values of the same type. but you can always use variadic objects, OOP, and pointers with casting
with variadic objects will look like this. for example json libraries in nim uses this approach
same using OOP