MATLAB: Find numbers in array

homeworkMATLAB

In general, assuming I have an array of random numbers, what should I do to find the max number? or the second largest? Without using the aforementioned functions?
I was thinking about relational operations, but I am unsure how indices can help finding the biggest number
Related Question