Work with scanning in data points and adding them to dynamic array