vector: Fix segmentation fault due array out of bounds
vector: Add linear search functionality and test cases